import request from '@/utils/request'

/**
 * 客户中心相关接口
 * @param data
 *
 * @returns
 */

const origin = ['mock', 'serve'].includes(import.meta.env.MODE) ? location.origin : '//apis.map.qq.com'

export const getLoaction = (data: any) => {
  return request({
    url: `${origin}/ws/location/v1/ip`,
    method: 'GET',
    params: data
  })
}

// 搜索
export const getGeocoder = (data: any) => {
  return request({
    url: `${origin}/ws/geocoder/v1`,
    method: 'GET',
    params: data
  })
}
//搜索关键字
export const getsuggestion = (data: any) => {
  return request({
    url: `${origin}/ws/place/v1/suggestion`,
    method: 'GET',
    params: data
  })
}
